-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements to django.contrib.auth
#246
Conversation
The implementation doesn't suggest that None is valid.
Any custom user model should inherit from AbstractUser
Not a whole Collection
This way AbstractUser has access to the special methods on UserManager
) -> None: ... | ||
|
||
class User(AbstractUser): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this meant to be deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not deleted, it's just moved down to line 111
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh whoops! thank you!
The highlight of this PR is changing
get_user_model()
to returntype[AbstractUser]
, which much more useful thantype[AbstractBaseUser]
.See commits for details and commentary.